﻿<%@ page title="卡管理 -> 批量添加卡数据" language="C#" masterpagefile="MasterPageFrame.master" autoeventwireup="true" inherits="admin_cardpub, App_Web_bgx0xzll" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
    td0{vertical-align:top}
    #cardtypeid,#cardtypeid1{width:220px}
    #cardnum{height:380px;width:220px;font-size:9pt;font-family:Arial;line-height:150%;background-image:url('css/textarealine.gif')}
    #frame0{height:380px;width:360px}
    #frame1{width:100%;height:150px;border:1px #999999 solid}
</style>
<script type="text/javascript">
    $(document).ready(function() {
        $form.addOption("cardtypeid", "", "请选择卡所属的卡类");
        //window.open("xmlcardtype.aspx");
        $form.addOptionsByXML("xmlcardtype.aspx", "cardtypeid", "cardtypeid", "cardtypename");
        $form.addOption("cardtypeid1", "", "请选择卡所属的卡类");
        //window.open("xmlcardtype.aspx");
        $form.addOptionsByXML("xmlcardtype.aspx", "cardtypeid1", "cardtypeid", "cardtypename");
    })
    function __checkform(evt) {
        return jsformcheck(evt, "form0");
    }
    function __checkform2(evt) {
        return jsformcheck(evt, "form1");
    }
    function __ruleit() {

        document.getElementById("cardnum").value = document.getElementById("cardnum").value.toString().replaceAll("\t", String.fromCharCode(32));
        document.getElementById("cardnum").value = document.getElementById("cardnum").value.toString().replaceAll("  ", " ");
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <fieldset><legend>手工录入卡数据</legend>
    <table class="formtable">
        <tr>
            <td class="td0">
                <fieldset><legend>数据录入区域</legend>
                    <form method="post" action="cardpubaction.aspx" target="frame0" id="form0">
                        <select id="cardtypeid" name="cardtypeid" nullabled="false" alerttext="请选择卡所属的卡类"></select><br/>
                        <textarea id="cardnum" name="cardnum" onchange="javascript:__ruleit();"></textarea>
                    </form>
                </fieldset>
            </td>
            <td>
                <input type="button" value="生成>>" class="btn" onclick="javascript:if(__checkform(event)) form0.submit();"/>
            </td>
            <td class="td0">
                <fieldset><legend>导入结果</legend>
                    <iframe id="frame0" name="frame0" frameborder="0"></iframe>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <div class="divHelp">
                    卡号与密码用空格隔开。输入一个卡号和卡密后，按回车键，进入第二行输入第二个卡号和卡密。如此类推。
                    <br/>可以直接从excell文档中把卡号和卡密这两列数据复制后直接粘帖到“数据录入区域”。<a href="cardsample.xls" target="_blank" style="color:Blue">卡数据excell模板下载</a>。
                    
                </div>
            </td>
        </tr>
    </table>
    </fieldset>
    <fieldset><legend>从excell文档中导入卡数据</legend>
        <form id="form1" enctype="multipart/form-data" method="post" action="cardpubaction2.aspx" target="frame1" onsubmit="javascript:return __checkform2(event)">
            <select id="cardtypeid1" name="cardtypeid" nullabled="false" alerttext="请选择卡所属的卡类"></select><input type="file" id="file0" name="file0" /><input type="submit" value="导入" />
        </form>
        <fieldset><legend>导入结果</legend>
            <iframe id="frame1" name="frame1" frameborder="0"></iframe>
        </fieldset>
    </fieldset>
</asp:Content>

